package xcmg.device.dao.mapper;


import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import xcmg.device.dao.entity.DataDictionaryDO;
import xcmg.device.dao.entity.PurchaseDictionaryDO;
import xcmg.device.service.vo.basic.DataDictionaryVO;
import xcmg.device.service.vo.basic.DictionaryRelationVO;
import xcmg.device.service.vo.basic.PurchaseDictionaryVO;

import java.util.List;

/**
 * 采购方式字典维护
 * @Author huhuawei
 */
@Mapper
public interface PurchaseDictionaryMapper {

    /**
     * 根据父节点和名称查询
     * 采购方式字典
     * @param record
     * @return
     */
    List<PurchaseDictionaryDO> list(PurchaseDictionaryVO record);

    /**
     * 根据code和OrgID查询
     * 是否存在信息
     * @param record
     * @return
     */
    int count(PurchaseDictionaryVO record);

    /**
     * 根据父节点ID或者ID查询
     * 是否存在信息
     * @param record
     * @return
     */
    int countByPid(PurchaseDictionaryVO record);

    /**
     * 添加采购方式字典信息
     * @param entity
     * @return
     */
    int add(PurchaseDictionaryVO entity);

    /**
     * 根据数组ID删除采购字典数据
     * @param ids
     * @return
     */
    int remove(@Param("ids") List<String> ids);

    /**
     * 根据采购方式字典表信息更新
     * @param record
     * @return
     */
    int update(PurchaseDictionaryVO record);

    /**
     * 根据ID查询单个采购方式
     * 字典信息
     * @param id
     * @return
     */
    PurchaseDictionaryDO item(@Param("id") String id);

}